-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen Dimming #651
base: main
Are you sure you want to change the base?
Screen Dimming #651
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an interesting mix of spaces and tabs used for indentation in the screenlock.vala
file, in some cases, both on the same line.
src/daemon/screenlock.vala
Outdated
if (sleep_inactive_battery_type == "suspend" && sleep_inactive_battery_timeout != 0) { | ||
output = "timeout " + sleep_inactive_battery_timeout.to_string(); | ||
output += " 'if dbus-send --print-reply=literal --dest=org.buddiesofbudgie.BudgieScreenlock /org/buddiesofbudgie/Screenlock org.buddiesofbudgie.BudgieScreenlock.OnBattery | grep \"boolean true\" > /dev/null; then systemctl suspend; fi' "; | ||
} | ||
|
||
if (sleep_inactive_ac_type == "suspend" && sleep_inactive_ac_timeout !=0) { | ||
output += " timeout " + sleep_inactive_ac_timeout.to_string(); | ||
output += " 'if dbus-send --print-reply=literal --dest=org.buddiesofbudgie.BudgieScreenlock /org/buddiesofbudgie/Screenlock org.buddiesofbudgie.BudgieScreenlock.OnBattery | grep \"boolean false\" > /dev/null; then systemctl suspend; fi' "; | ||
} | ||
|
||
return output; | ||
} | ||
|
||
private string calculate_dim() { | ||
isdimmable = this.power.get_boolean("idle-dim"); | ||
|
||
if (!isdimmable) return ""; | ||
|
||
return "timeout 30 'dbus-send --type=method_call --dest=org.buddiesofbudgie.BudgieScreenlock /org/buddiesofbudgie/Screenlock org.buddiesofbudgie.BudgieScreenlock.Dim' resume 'dbus-send --type=method_call --dest=org.buddiesofbudgie.BudgieScreenlock /org/buddiesofbudgie/Screenlock org.buddiesofbudgie.BudgieScreenlock.Undim' "; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do this when we have the methods available to us right in this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'fraid I don't understand the comment. Here we are adding a timeout/resume to swayidle to perform the dim/undim stuff if its set in BCC to screendim
c5d505d
to
38519d8
Compare
That was resolved via the original screenlock PR - now merged. |
Description
This PR adds power-dimming support if configured in BCC Power.
Also added on Evan's request, the ability to style gtklock via the gtklock config & style files if they exist in their home config/budgie-desktop folder.
i.e. if idle-dim is configured then swayidle will dim after 30 seconds and resume with the original set brightness.
It uses gsd-power to configure brightness settings.
Marking as draft until the screenlock PR is dealt with and then this will need rebasing.
Submitter Checklist
git rebase -i
(if needed)